package net.csdra.libraryborrowing.domain.user;

import net.csdra.libraryborrowing.domain.EntityBase;
import net.csdra.libraryborrowing.domain.book.BookCopy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import java.util.List;

/**
 * Created by msf on 2017/10/9.
 * 用户借阅记录
 * metaId为userId
 */
@Entity
public class UserBookHistory extends EntityBase {

    @Column(unique = true)
    String metaId;

    @OneToMany
    List<BookCopy> bookCopies;

    public List<BookCopy> getBookCopies() {
        return bookCopies;
    }

    public void setBookCopies(List<BookCopy> bookCopies) {
        this.bookCopies = bookCopies;
    }

    @Override
    public String getMetaId() {
        return metaId;
    }

    @Override
    public void setMetaId(String metaId) {
        this.metaId = metaId;
    }
}
